home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / auror300.zip / CFGLDLM.AML < prev    next >
Text File  |  1996-07-17  |  2KB  |  68 lines

  1. //--------------------------------------------------------------------
  2. // The Aurora Editor v3.0, Copyright (C) 1993-1996 nuText Systems
  3. //
  4. // CFGLDLM.AML
  5. // Configuration for Line Delimiter Options
  6. //--------------------------------------------------------------------
  7.  
  8. include bootpath "define.aml"
  9.  
  10. variable linedlm, binlen, trunclen, delimwin
  11.  
  12. // change edit field from groupbox
  13. function changedlm
  14.   dlm = case getrow
  15.           when 1 "0D0A"
  16.           when 2 "0D"
  17.           when 3 "0A"
  18.           otherwise ''
  19.         end
  20.   if dlm then
  21.     buf = getwinbuf delimwin
  22.     oldbuffer = gotobuf delimwin
  23.     col 1
  24.     delchar 16000
  25.     instext dlm
  26.     gotobuf oldbuffer
  27.   else
  28.     currwin delimwin
  29.     col getlinelen + 1
  30.   end
  31. end
  32.  
  33. lineopt = case _LineDlm
  34.             when "0D0A"  'c'
  35.             when "0D"    'r'
  36.             when "0A"    'l'
  37.             otherwise    'o'
  38.           end
  39.  
  40. // create dialog box
  41. dialog "Line Delimiter Options" 41 11 "cp"
  42.  
  43. // display delimiter options
  44. groupbox 'Delimiter:' 3 2
  45.   (menu ''
  46.      item " ( ) &CR/LF          (Dos)"
  47.      item " ( ) C&R Only        (Mac)"
  48.      item " ( ) &LF Only       (Unix) "
  49.      item " ( ) &Other"
  50.    end) '' lineopt "crlo"
  51. whenselect "changedlm"
  52.  
  53. delimwin = field "&Delimiter in hex:   >"  3  8 6 _LineDlm
  54.  
  55. field "&Binary Line Length: >" 3  9  6 _BinaryLength
  56. field "&Truncation Length:  >" 3 10  6 _TruncLength
  57.  
  58. // ok/cancel buttons
  59. button "O&k"    31 3 8
  60. button "Cancel" 31 5 8
  61.  
  62. // display dialog box
  63. if (getdialog ref lineopt ref linedlm ref binlen ref trunclen ) == 'Ok' then
  64.   prf.LineDlm       = linedlm
  65.   prf.BinaryLength  = binlen
  66.   prf.TruncLength   = trunclen
  67. end
  68.